<template>
  <div>
    <dv-decoration-7 >当前商品总数</dv-decoration-7>
    <dv-digital-flop :config="config"  />
  </div>
</template>

<script>
    export default {
        name: "number",
        data(){
          return {
            config: {
              number: [123456],
              content: '{nt}个',
              formatter: this.formatter
            }
          }
        },
      methods: {
        formatter(number){
          const numbers = number.toString().split('').reverse()
          const segs = []
          while (numbers.length) segs.push(numbers.splice(0, 3).join(''))
          return segs.join(',').split('').reverse().join('')
        }
      }
    }
</script>

<style scoped>
</style>
